﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@model SenFangKaoHe_MVC.Models.ViewModel.TempShiJuan;
@{
    Layout = null;
}
<link rel="stylesheet" href="/css/ShiJuanStyle.css" />
<script src="~/js/jquery-3.7.1.min.js"></script>


<div id="info" style="text-align:center;">
    <div id="info1">
        <h1><label id="khmc" style="font-size:35px;font-family:SimHei">@Model.KaoHeMingCheng</label></h1><br />
        【考核范围】<br />
            <div id="fwdiv" style="font-size:25px;font-family:SimHei"></div>
    </div>
    <div id="info1">
        <div class="infodiv">
            【参考队员】<br /><label id="dyxm" style="font-size:35px;font-family:SimHei">@Model.XingMing</label>
        </div>
        <div class="infodiv">
            【理论成绩】<br /><label id="llcj" style="font-size:35px;font-family:SimHei">@Model.ChengJi</label>
        </div>
        <div class="infodiv">
            【绩效得分】<br /><label id="jxdf" style="font-size:35px;font-family:SimHei">@Model.FenZhi</label>
        </div>
    </div>
</div>
<div id="info">
    <hr />
    <div id="biaotilan" style="color:crimson">错题列表</div>
    <div id="ctdiv"></div>
    <div style="text-align:center;">
        <input type="button" onclick='location.href=("index.aspx")' value="继续学习" class="btn" />
    </div>
</div>

<script>
    var khfw = @Json.Serialize(@Model.KaoHeFanWei);
    var khfwsize = khfw.split(",").length;
    var fwhtml = "";

    for(var v = 0;v<khfwsize;v++){
        fwhtml += khfw.split(",")[v]+"<br />";
    }
    document.getElementById("fwdiv").innerHTML = fwhtml;
    var ctlist = @Json.Serialize(@Model.ShiTi);
    if (ctlist.length > 0) {   //如果错题ids不为空
                var cthtml="";
                for (var a = 0; a < ctlist.length; a++) {
                    //选项排列
                    var xxhtml = "";
                    for (var i = 0; i < ctlist[a].xuanXiang.length; i++) {
                        xxhtml += `&nbsp;&nbsp;<i>${String.fromCharCode(65 + i)}</i> 、` + ctlist[a].xuanXiang[i] + "<br />";
                    }
                    var tiXing= "";
                    switch(ctlist[a].tiXingId){
                        case 1:
                        tiXing = "填空题";
                        break;
                        case 2:
                        tiXing = "单选题";
                        break;
                        case 3:
                        tiXing = "多选题";
                        break;
                        case 4:
                        tiXing = "判断题";
                        break;
                    }
                    var dyda = ctlist[a].duiYuanDaAn != '' ? ctlist[a].duiYuanDaAn : '未作答';
                    cthtml += ctlist[a].id + "、【" + tiXing + "】("+ctlist[a].fenZhi+"分)&nbsp;" + ctlist[a].tiMu + "<br />" + xxhtml + "&nbsp;&nbsp;【标准答案】" + ctlist[a].biaoZhunDaAn + "&nbsp;&nbsp;&nbsp;&nbsp;【你的答案】<label style='color:#A52A2A'>" + dyda + "</label><br /><br />";
                }
                document.getElementById("ctdiv").innerHTML = cthtml;
            }
    
</script>
